jun.Barangstore = Ext.extend(Ext.data.JsonStore, {
    constructor: function (cfg) {
        cfg = cfg || {};
        jun.Barangstore.superclass.constructor.call(this, Ext.apply({
            storeId: 'BarangStoreId',
            url: 'Barang',
            root: 'results',
            totalProperty: 'total',
            fields: [
                {name: 'barang_id'},
                {name: 'barcode'},
                {name: 'barang_name'},
                {name: 'bonus'},
                {name: 'price_pcs'},
                {name: 'price_lsn'},
                {name: 'price_pak'},
                {name: 'pak_2_pcs'},
                {name: 'price_max'},
                {name: 'sat_max'},
                {name: 'max_2_pcs'},
                {name: 'stok_minimal'},
                {name: 'status'},
                {name: 'supplier_id'},
                {name: 'price_buy'},
                {name: 'ppn'}
            ]
        }, cfg));
    }, FilterData: function () {
        this.filter([
            {property: "status", value: "1"}
        ])
    }
});
jun.rztBarangLib = new jun.Barangstore();
jun.rztBarangMaster = new jun.Barangstore();

jun.BarangCmpstore = Ext.extend(Ext.data.JsonStore, {
    constructor: function (cfg) {
        cfg = cfg || {};
        jun.BarangCmpstore.superclass.constructor.call(this, Ext.apply({
            storeId: 'BarangCmpStoreId',
            url: 'Barang/cmp',
            root: 'results',
            totalProperty: 'total',
            fields: [
                {name: 'barang_id'},
                {name: 'barcode'},
                {name: 'barang_name'},
                {name: 'status'},
                {name: 'sisa'}
            ]
        }, cfg));
    }, FilterData: function () {
        this.filter([
            {property: "status", value: "1"}
        ])
    }
});
jun.rztBarang = new jun.BarangCmpstore();